package com.caixin.domain.user.specification;

import com.caixin.domain.user.agg.User;
import com.caixin.domain.user.repository.UserRepo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

/**
 * 业务规则
 *
 * @author Administrator
 * @version 1.0.0
 * @createTime 2021年12月08日 20:23
 */
@Component
public class UserSpecification {

    @Autowired
    private UserRepo userRepo;

    /**
    *系统
    *
    * @return boolean
    * @date 2021年12月09日 19:36
    */
    public  boolean  checkCreateUser()
    {
        User ccx = userRepo.findUserByName("ccx");
        Assert.isNull(ccx,"");
        return true;
    }
}
